Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive multisig ownership history based on past transactions and latest discovery output #103

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

sdlyy
Copy link
Member

@sdlyy sdlyy commented Dec 18, 2023

Resolves L2B-3124

What's changed

Ownership history is derived from internal multi-sig transactions.
I reorganized a few things, but nothing breaking was introduced.

Notes

We could fire getDecodedProperties only once, now we do that in 2 * amount of txs manner. We ain't need optimizations for now

@sdlyy sdlyy self-assigned this Dec 18, 2023
Copy link

vercel bot commented Dec 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
lz-monitoring-frontend ✅ Ready (Inspect) Visit Preview Jan 5, 2024 4:09pm

@sdlyy sdlyy changed the title feat: add multisig ownership derivation from transactions Derive multisig ownership history based on past transactions and latest discovery output Dec 18, 2023
Comment on lines +151 to +152
(ownerModification.decoded?.method === 'addOwnerWithThreshold' ||
ownerModification.decoded?.method === 'removeOwner') &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also need the function changeThreshold here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We ain't need threshold since whenever transactions was successfully executed, we assume quorum has been reached

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're only recreating owner's amount history

Comment on lines +147 to +149
const ownerChangingTransactions = allTransactions
.map((tx) => ({ raw: tx, decoded: getDecodedProperties(tx) }))
.filter(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that all the transactions here have been executed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's exactly the purpose of line ~153, where we filter only executed transactions

@sdlyy
Copy link
Member Author

sdlyy commented Jan 5, 2024

Up 'n Down
image

Ignoring discarded txs:
image

@sdlyy sdlyy merged commit ef1cc37 into main Jan 9, 2024
5 checks passed
@sdlyy sdlyy deleted the feat/include-variable-owners-within-tx branch January 9, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants